<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-06-12
 * Time: 12:09
 */

// 增加一个新的table助手函数
function table($table, $config = [])
{
    return \think\Db::connect($config)->setTable($table);
}

// 替换已有的db助手函数
function db($name, $config= [])
{
    return \think\Db::connect($config)->name($name);
}